package com.itheima.string;

import java.util.Scanner;

public class StringSpilt {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入信息");
        String stuinfo = sc.nextLine();//输入
        String[] sArr = stuinfo.split(",");//根据","进行切割,返回一个字符串数组;
        Student stu = new Student(sArr[0],sArr[1]);//新建对象,并根据切割数组有参构造
        System.out.println(stu.getName()+"..."+stu.getAge());//打印结果
    }
}